<html>
<head>
    <title>Binding Test</title>
    <script language="JavaScript">

        // Send a query to the browser process.
        function sendMessage() {
            // Results in a call to the OnQuery method in binding_test.cpp
            window.cefQuery({
                request: 'BindingTest:' + document.getElementById("message").value,
                onSuccess: function (response) {
                    document.getElementById('result').value = 'Response: ' + response;
                },
                onFailure: function (error_code, error_message) {
                }
            });
        }
    </script>

</head>
<body bgcolor="white">
<form>
    Message: <input id="message" type="text" value="My Message">
    <br/><input onclick="sendMessage();" type="button" value="Send Message">
    <br/>You should see the reverse of your message below:
    <br/><textarea cols="40" id="result" rows="10"></textarea>
</form>
</body>
</html>
